import { Component, OnInit, Input } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';

@Component({
  selector: 'tab-list',
  templateUrl: './tab-list.component.html',
  styleUrls: ['./tab-list.component.scss']
})
export class TabListComponent implements OnInit {
  @Input() mode = 'horizontal';
  @Input() tabList: Array<{name: string, link: string}>;

  constructor(private router: Router, private activeRoute: ActivatedRoute) { }

  ngOnInit() {
  }

  test(routerLink: string) {
    this.router.navigate([routerLink], { relativeTo: this.activeRoute });
  }
}
